package com.MedDroid.entities.user;

/**
 * Created with IntelliJ IDEA.
 * User: Romen
 * Date: 29/11/13
 * Time: 1:50 PM
 * Description: Represents a Booster/Shot instance with a long for date, Strings for shot name and comments.
 */
public class ShotHistory
{
	//CONSTANTS
	public static final String Separator = "~~~";

	//PRIVATE VARIABLES
	long Date;
	String ShotName;
	String Comments;

	//CONSTRUCTOR
	public ShotHistory(long Date, String Shot, String Comments)
	{
		this.Date = Date;
		this.ShotName = Shot;
		this.Comments = Comments;
	}

	//GET METHODS

	public long getDate()
	{
		return Date;
	}

	public String getShotName()
	{
		return ShotName;
	}

	public String getComments()
	{
		return Comments;
	}

	//IMPORT AND EXPORT BY STRING
	public String getShotString()
	{
		return Long.toString(Date) + Separator + ShotName + Separator + Comments;
	}

	public static ShotHistory buildShotfromString(String ShotString)
	{
		String[] Data = ShotString.split(Separator);
		return new ShotHistory(Long.parseLong(Data[0]),Data[1],Data[2]);
	}
}
